<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:AppStudio.Controls"
    xmlns:html2xaml="using:AppStudio.Controls.Html2Xaml"
    xmlns:commands="using:AppStudio.Commands">

    <!-- ListPhotoLeft -->
    <DataTemplate x:Key="FacebookList">
        <Grid>
            <ListView ItemsSource="{Binding Items}"  SelectionMode="None" IsSwipeEnabled="False" IsItemClickEnabled="True"  commands:ItemClickCommand.Command="{Binding ItemClickCommand}" ScrollViewer.VerticalScrollBarVisibility="Hidden"
                     ItemTemplate="{StaticResource FacebookItem}">
            </ListView>
            <ProgressBar Width="380" Height="40" Foreground="White" VerticalAlignment="Top" IsIndeterminate="True" Visibility="{Binding ProgressBarVisibility}" />
        </Grid>
    </DataTemplate>

    <!-- ListPhotoLeft Item -->
    <DataTemplate x:Key="FacebookItem">
        <Grid MinWidth="380">
            <Grid.RowDefinitions>
                <RowDefinition Height="120"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="140"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Image Grid.Row="0" Grid.Column="0" Margin="0, 8" Source="{Binding ImageUrl, Converter={StaticResource ThumbnailConverter}, ConverterParameter=220}" MaxHeight="110"
                    Stretch="UniformToFill" VerticalAlignment="Top" />

          <StackPanel Grid.Row="0" Grid.Column="1">
            <TextBlock Grid.Row="0" Grid.ColumnSpan="2" Margin="16, 8, 20, 10" Style="{StaticResource ItemHeaderWrapText}" MaxHeight="50" VerticalAlignment="Center"
                        Text="{Binding Title, Converter={StaticResource TextPlainConverter}, ConverterParameter=140}" />
            <TextBlock Grid.Row="1" Grid.Column="1" Margin="16, 8, 20, 10" Style="{StaticResource ItemSubheaderText}" MaxHeight="110" VerticalAlignment="Top"
                        Text="{Binding Summary, Converter={StaticResource TextPlainConverter}, ConverterParameter=280}" />
          </StackPanel>
        </Grid>
    </DataTemplate>


    <!-- InstancePhotoDescription -->
    <DataTemplate x:Key="Facebook1DetailDetail">
      <ScrollViewer>
        <StackPanel>
            <TextBlock Margin="0,16" Text="{Binding Title, Converter={StaticResource TextPlainConverter}, ConverterParameter = 140}" Style="{StaticResource SubHeaderText}" />
            <Button Width="400" Height="300" Visibility="{Binding ImageUrl , Converter={StaticResource VisibilityConverter}}" Style="{StaticResource ImageButtonStyle}" Command="{Binding Source={StaticResource ActionCommands}, Path=ShowImage}" CommandParameter="{Binding ImageUrl}">
              <Button.Background>
                <ImageBrush ImageSource="{Binding ImageUrl, Converter={StaticResource ThumbnailConverter}, ConverterParameter=300}" Stretch="UniformToFill" />
              </Button.Background>
            </Button>
                      <RichTextBlock Margin="0,12"  Style="{StaticResource Html2XamlStyle}"
             html2xaml:Properties.Html="{Binding Content}" />
        </StackPanel>
        </ScrollViewer>
    </DataTemplate>

</ResourceDictionary>
